package com.cdgeekcamp.redas.db.model;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface SubscriptionRepository extends CrudRepository<Subscription, Integer> {
    List<Subscription> findByUserId(Integer userId);
    List<Subscription> findByKeywordId(Integer keywordId);
    List<Subscription> findByHashKey(String hashKey);
    List<Subscription> findByUserIdAndHashKey(Integer userId, String hashKey);
    Page<Subscription> findAll(Pageable pageable);

}
